<?php header('Content-Type: text/html; charset=utf-8'); ?>
<style type="text/css">
.fd {
	font-family: "MS Serif", "New York", serif;
	font-size: 24px;
	font-style: normal;
	text-decoration: blink;
	background-color: #0C6B8B;
	color: #FFF;
}
.alineacion_agregar_prodcto {
	text-align: center;
}
</style>
<link href="../../webroot/css/styles.css" rel="stylesheet" type="text/css" />
<table width="100%" height="446" border="0" summary="jjj">
  <caption>&nbsp;
  </caption>
  <tr>
    <th width="17%" height="39" scope="col">&nbsp;</th>
    <th colspan="4" align="center" valign="middle" scope="col"><h1 class="fd">Administrador de contenido</h1></th>
    <th width="17%" scope="col">&nbsp;</th>
  </tr>
  <tr>
    <td height="21"></td>
    <td colspan="4" align="center" valign="middle" bgcolor="#CECEFF" class="titulos_productos_admin"><?php echo $titulo_admin; ?></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="21"><span class="alineacion_agregar_prodcto"><?php echo $this->Html->link("Agregar Producto", array('action' => 'add')); ?></span></td>
    <td colspan="4" align="center" valign="middle" bgcolor="#FFFFCC" class="alineacion_barra_admin"><?php echo $this->Html->link('Exclusividades',
                  array('controller' => 'exclusividades', 'action' => 'admin_index'),
                  array('class' => "menunaranja",'target' => "_self" ));?> | <?php echo $this->Html->link('Cocina',
					  array('controller' => 'cocinas', 'action' => 'admin_index'),
					  array('class' => "menunaranja",'target' => "_self" ));?> | <?php echo $this->Html->link('Comedor',
                  array('controller' => 'comedores', 'action' => 'admin_index'),
                  array('class' => "menunaranja",'target' => "_self" ));?> | <?php echo $this->Html->link('Escritorio',
                  array('controller' => 'escritorios', 'action' => 'admin_index'),
                  array('class' => "menunaranja",'target' => "_self" ));?> | <?php echo $this->Html->link('Baño',
                  array('controller' => 'banos', 'action' => 'admin_index'),
                  array('class' => "menunaranja",'target' => "_self" ));?></td>
    <td>&nbsp;</td>
  </tr>
  <?php 	
		$i=0;
		$bandera_=1;
        foreach ($escritorios as $articulo) {        
			if (($i%4 == 0) && ($bandera_ == 1) ){ // crear nueva fila
               echo "<tr>";
			   echo "<td height=\"100%\" rowspan=\"5\">
    <p>&nbsp;</p></td>";
				$bandera_ = 2;
               
         	}
			else if (($i%4 == 0) && ($bandera_ == 2)){
					echo "<td rowspan=\"5\">&nbsp;</td>";
					echo "</tr> <tr>";
					$bandera_ = 0;
				 }
				 else if ($i%4 == 0)echo "</tr> <tr>"; 
				 
			      			
            $nombre_archivo = "escritorio/".$articulo['Escritorio']['id'].".jpg";
                  			echo "<td width=\"17%\" height=\"61\" align=\"center\" valign=\"middle\" bgcolor=\"#FFFFCC\">";
                  			echo  $this->Html->image($nombre_archivo, array("alt" => "INDIVIDUALES", "width" => "135", "height" => "135", "border" => "0"));
                  			echo "<br/>";
    						echo  $this->Html->link(
    							  					$this->Html->image("DeleteRed.png", array("alt" => "delete", "width" => "30", "height" => "30", "border" => "0")),
    							  array('controller' => 'escritorios', 'action' => 'admin_delete', $articulo['Escritorio']['id']),  array('escape' => false, 'title' => 'eliminar'));
    						echo "&nbsp;";echo "&nbsp;";
    						echo  $this->Html->link(
    							  					$this->Html->image("edit.png", array("alt" => "delete", "width" => "30", "height" => "30", "border" => "0")),
    							  array('controller' => 'escritorios', 'action' => 'admin_edit', $articulo['Escritorio']['id']),  array('escape' => false, 'title' => 'editar'));
								  
			echo "</td>";
    							
                  			
                  			$i++;
						
        }
?>
  <!--<tr>
    <td height="100%" rowspan="5"><p>&nbsp;</p>
    <p>&nbsp;</p></td>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC"><p>&nbsp;</p></td>
    <td width="17%" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="17%" align="center" valign="middle">&nbsp;</td>
    <td width="17%" align="center" valign="middle">&nbsp;</td>
    <td rowspan="5">&nbsp;</td>
  </tr>
  <tr>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
  </tr>
  <tr>
    <td height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
  </tr>
  <tr>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
    <td width="17%" height="61" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
  </tr>
  <tr>
    <td height="21" colspan="4" align="center" valign="middle" bgcolor="#FFFFCC">&nbsp;</td>
  </tr>-->
</table>
